package com.xt.purchasingsystem.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.xt.purchasingsystem.dto.CarGoDto;
import com.xt.purchasingsystem.dto.ReleaseCargoDto;
import com.xt.purchasingsystem.model.ReleaseCargo;
import com.xt.purchasingsystem.model.ReleaseCargoDetail;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author yhp
 * @since 2020-05-31
 */
public interface ReleaseCargoMapper extends BaseMapper<ReleaseCargo> {
    /**
     * 查询所有未审核的放货登记及其明细的方法
     * @return
     */
    List<ReleaseCargoDto> getAllReleaseCargoAndDetailsIsNoCheck();

    /**
     * 根据指定天数和供应商编号查询这天所有的登记总数
     * @param supplierId
     * @param day
     * @return
     */
    Long getSumAmountBySupplierIdAndDate(@Param("supplierId") String supplierId , @Param("day") int day);


    /**
     * 查询已审核未质检的放货登记
     */
    List<ReleaseCargoDto> qualityInspectionResults();


}
